#include <stdio.h>
#include <wiringPi.h>
#include "clockwork.h"
#define PIN 7

int main (void)
{
    wiringPiSetup () ;
    pinMode (PIN, INPUT) ;
	pullUpDnControl(PIN, PUD_UP) ;

	settime(8,58,55);
	printtime();

	while(1)
		{
			while ( 1 == digitalRead(PIN))
				{
				delay(1);
				}
			while ( 0 == digitalRead(PIN))
				{
				delay(1);
				}
			incrementsecond();
			printtime();
		}
				
 return 0 ;
}